package oop.ex2.tokenizer;

import oop.ex2.expression.ExpressionNode;
import oop.ex2.expression.SequenceExpressionNode;
import oop.ex2.expression.SymbolNode;

/**
 * This searches for any symbol that doesn't directly correspond to a Node. It returns an expression
 * node that simply holds the token.
 * The symbols that are searched for are:
 * ']', '}', ','
 * @author daniel_i_l
 *
 */
public class SymbolAnalyzer extends TokenAnalyzer {
	private static final String PATTERN = "((\\])|(\\})|(\\,))" ;
	
	/**
	 * Initialize the pattern.
	 */
	public SymbolAnalyzer() {
		super(PATTERN);
	}

	@Override
	public ExpressionNode getExpressionNode() {
		return new SymbolNode(_matchedString);
	}

}